<template>
	<div>
		 <Model v-bind:taskId="taskId" v-bind:userId="userId"></Model>
		<div class="container">
        <!-- 审批信息 -->
        <div class="info-preview project">
            <div class="h5-list-flex content h5-apply-time border-bottom-green">
                <div class="h5-list-title-img"><img src="../../assets/images/title-project.png"></div>
                <div class="h5-item-label">方案名称</div>
                <div class="h5-item-content white">{{priceSchemeApply.secheme}}</div>
            </div>
           <!-- <div class="h5-list-address content padding-top-none">
                <div class="h5-list-flex font15">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-address.png"></div>
                   	 房产地址
                </div>
                <div class="white h5-address">南京东方玉园->1期->洋房10号楼->3单元->305</div>
            </div>-->
            <div class="h5-list-flex content h5-apply-time border-top-bottom-green">
                <div class="h5-list-title-img"><img src="../../assets/images/title-user-big.png"></div>
                <div class="h5-item-label">发起人</div>
                <div class="h5-item-content white">{{priceSchemeApply.createCN}}</div>
            </div>
            <div class="h5-list-flex content h5-apply-time">
                <div class="h5-list-title-img"><img src="../../assets/images/title-time.png"></div>
                <div class="h5-item-label">申请时间</div>
                <div class="h5-item-content white">{{priceSchemeApply.createTime}}</div>
            </div>
        </div>
        <div class="h5-list after margin-top ">
            <div class="h5-list-box">
                <div class="h5-list-flex h5-list-title border-bottom-primary green">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-project-info-after.png"></div>
                    方案信息：
                </div>
                <div class="content">
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">方案详情：</div>
                        <div class="h5-item-content">请登录电脑端查看价格详情</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">计价方式：</div>
                        <div class="h5-item-content">{{priceSchemeApply.valuationType}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">折扣方式：</div>
                        <div class="h5-item-content" v-if="priceSchemeApply.floorType==0">折后总价（元）</div>
                        <div class="h5-item-content" v-if="priceSchemeApply.floorType==1">折扣比例（%）</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">方案执行日期：</div>
                        <div class="h5-item-content">{{priceSchemeApply.executionDate}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">方案说明：</div>
                    </div>
                    <div class="h5-height-default h5-item-txt">
                     	{{priceSchemeApply.remark}}
                    </div>
                </div>
            </div>
        </div>
         <!--设置单页面标题-->
	    <Document v-bind:processId="processId"></Document>
          <!-- 附件 -->
     	<ActivityFile v-bind:objectId="objectId" v-bind:imageType="imageType"></ActivityFile>
        <!-- 审批进度 h-->
        <ActivityHistory v-bind:processId="processId" v-bind:userId="userId"></ActivityHistory>
        
    </div>
    <div class="md-overlay"></div>
    <div class="h5-btn-list">
        <a class="h5-btn h5-btn-primary md-trigger" data-modal="modal-1" style="width:100%;">审核</a>
    </div>
		
	</div>
	
</template>

<script>
	import Document from '../common/document.vue'
	import ActivityFile from '../common/activityFile.vue';
	import ActivityHistory  from '../common/activityHistory.vue';
	import Model from '../common/modal.vue';
	export default{
		data(){
			return{
				priceSchemeApply:{},
				objectId:'',
				imageType:'8',
				processId:'',
				userId:'',
				taskId:''
			}
		},
		mounted:function(){
			this.priceSchemeApplyInfo();
		},components:{
			Document,
			ActivityFile,
			ActivityHistory,
			Model
		},
		methods:{
			priceSchemeApplyInfo:function(){
				var _self = this;
				var busKey = _self.$route.params.busKey;
				_self.userId = _self.$route.params.userId;
				_self.processId = _self.$route.params.processId;
				_self.taskId = _self.$route.params.taskId;
				_self.objectId = busKey;
				var params = {
					id:busKey
				};
				var url = _self.utilHelper.apiUrl+'/wordFlowData/priceSchemeApplyInfo';
				_self.$http.post(url,params).then((response)=>{
					var body = response.body;
					if(body.res=="1"){
						_self.priceSchemeApply = body.obj.priceScheme;
					}else{
						layer.alert("接口异常,请联系管理员!");
					}
				});
			}
		}
	}
</script>
